package com.czy.designPatterns.监听者模式.diy;

/**
 * @Author: czy
 * @Date: 2019/6/6 8:53
 */
public class RemindListener {
    public void remind(RemindWashingHandsEvent remindWashingHandsEvent){
        System.out.println("listen to mom, washing hands before eating...");
    }

    public static void main(String[] args) {
        Child child = new Child("小明");
        child.addListener(new RemindListener());
        child.eat();
    }
}
